package com.triones.biz.infra.entity.file;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.ruoyi.common.core.domain.BaseEntity;
import com.triones.framework.file.core.client.FileClientConfig;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 文件配置对象 tr_infra_file_config
 *
 * @author triones
 * 2023-09-19
 */
@TableName(value = "tr_infra_file_config", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class FileConfigDO extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 编号
     */
    @TableId(value = "id")
    private Long id;
    /**
     * 配置名
     */
    private String name;
    /**
     * 存储器
     */
    private Integer storage;
    /**
     * 备注
     */
    private String remark;
    /**
     * 是否为主配置
     */
    private Integer master;
    /**
     * 存储配置
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private FileClientConfig config;
    /**
     * 是否删除 0否 1是
     */
    @TableLogic
    private Integer deleted;
}
